package com.haoshuang.zhouzhoubang.ui.page.shop.order.child

import com.haoshuang.zhouzhoubang.R
import com.haoshuang.zhouzhoubang.databinding.ItemShopOrder2Binding
import com.haoshuang.zhouzhoubang.model.bean.OrderBean8
import com.mufeng.libs.base.BaseBindingHolder
import com.mufeng.libs.base.BaseBindingQuickAdapter
import com.mufeng.libs.utils.view.load


/**
 * 订单模块中的订单列表适配器
 * */
class ShopOrderListAdapter2(data: MutableList<OrderBean8.CartInfo>) :
    BaseBindingQuickAdapter<OrderBean8.CartInfo, ItemShopOrder2Binding>(data){

    override fun onBindViewHolder(
        holder: BaseBindingHolder,
        position: Int,
        item: OrderBean8.CartInfo?
    ) {
        val binding = ItemShopOrder2Binding.bind(holder.itemView)
        binding.apply {
            ivGoods.load(item?.image, R.mipmap.default_image)
            storeName.text=item?.store_name
            tvPrice.text=item?.price
            cartNum.text="x"+item?.cart_num.toString()
            tvSpec.text = item?.select_spec?:""
        }
    }

}